<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>Class: tinymce.ControlManager</title>
<meta name="generator" content="MoxieDoc" />

<link rel="stylesheet" type="text/css" href="css/reset.css" />
<link rel="stylesheet" type="text/css" href="css/grids.css" />
<link rel="stylesheet" type="text/css" href="css/general.css" />

<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
	google.load("jquery", "1.3");
</script>
<script type="text/javascript" src="js/jquery.treeview.min.js"></script>
<script type="text/javascript" src="js/general.js"></script>
</head>
<body>
<div class="classDetailsContent">
<h1>tinymce.ControlManager</h1>
<table class="classDetails">
<tr>
<td class="first">Namespace</td>
<td class="last">tinymce</td>
</tr>
<tr>
<td class="first">Class</td>
<td class="last">ControlManager</td>
</tr>
</table>
<div class="classDescription">This class is responsible for managing UI control instances. It's both a factory and a collection for the controls.</div>
<div class="summaryLists">
<h2>Public Methods</h2>
<table class="Methods summary">
<thead>
<tr>
<th>Method</th>
<th>Defined By</th>
</tr>
</thead>
<tbody>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ControlManager.html#ControlManager">ControlManager</a>(ed:<a href="class_tinymce.Editor.html">Editor</a>, s:Object)</div>
<div class="summary">Constructs a new control manager instance.</div>
</td>
<td class="last">ControlManager</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ControlManager.html#add">add</a>(Control:<a href="class_tinymce.ui.Control.html">Control</a>):<a href="class_tinymce.ui.Control.html">Control</a>
</div>
<div class="summary">Adds a control to the control collection inside the manager.</div>
</td>
<td class="last">ControlManager</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ControlManager.html#createButton">createButton</a>(id:String, s:Object, cc:Object):<a href="class_tinymce.ui.Control.html">Control</a>
</div>
<div class="summary">Creates a button control instance by id.</div>
</td>
<td class="last">ControlManager</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ControlManager.html#createColorSplitButton">createColorSplitButton</a>(id:String, s:Object, cc:Object):<a href="class_tinymce.ui.Control.html">Control</a>
</div>
<div class="summary">Creates a color split button control instance by id.</div>
</td>
<td class="last">ControlManager</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ControlManager.html#createControl">createControl</a>(n:String):<a href="class_tinymce.ui.Control.html">Control</a>
</div>
<div class="summary">Creates a control by name, when a control is created it will automatically add it to the control collection.</div>
</td>
<td class="last">ControlManager</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ControlManager.html#createDropMenu">createDropMenu</a>(id:String, s:Object, cc:Object):<a href="class_tinymce.ui.Control.html">Control</a>
</div>
<div class="summary">Creates a drop menu control instance by id.</div>
</td>
<td class="last">ControlManager</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ControlManager.html#createListBox">createListBox</a>(id:String, s:Object, cc:Object):<a href="class_tinymce.ui.Control.html">Control</a>
</div>
<div class="summary">Creates a list box control instance by id.</div>
</td>
<td class="last">ControlManager</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ControlManager.html#createMenuButton">createMenuButton</a>(id:String, s:Object, cc:Object):<a href="class_tinymce.ui.Control.html">Control</a>
</div>
<div class="summary">Creates a menu button control instance by id.</div>
</td>
<td class="last">ControlManager</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ControlManager.html#createSeparator">createSeparator</a>(cc:Object):<a href="class_tinymce.ui.Control.html">Control</a>
</div>
<div class="summary">Creates a separator control instance.</div>
</td>
<td class="last">ControlManager</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ControlManager.html#createSplitButton">createSplitButton</a>(id:String, s:Object, cc:Object):<a href="class_tinymce.ui.Control.html">Control</a>
</div>
<div class="summary">Creates a split button control instance by id.</div>
</td>
<td class="last">ControlManager</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ControlManager.html#createToolbar">createToolbar</a>(id:String, s:Object, cc:Object):<a href="class_tinymce.ui.Control.html">Control</a>
</div>
<div class="summary">Creates a toolbar container control instance by id.</div>
</td>
<td class="last">ControlManager</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ControlManager.html#destroy">destroy</a>():void</div>
<div class="summary">Destroy.</div>
</td>
<td class="last">ControlManager</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ControlManager.html#get">get</a>(id:String):<a href="class_tinymce.ui.Control.html">Control</a>
</div>
<div class="summary">Returns a control by id or undefined it it wasn't found.</div>
</td>
<td class="last">ControlManager</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ControlManager.html#setActive">setActive</a>(id:String, s:Boolean):<a href="class_tinymce.ui.Control.html">Control</a>
</div>
<div class="summary">Sets the active state of a control by id.</div>
</td>
<td class="last">ControlManager</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ControlManager.html#setControlType">setControlType</a>(n:string, c:function):function</div>
<div class="summary">Overrides a specific control type with a custom class.</div>
</td>
<td class="last">ControlManager</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ControlManager.html#setDisabled">setDisabled</a>(id:String, s:Boolean):<a href="class_tinymce.ui.Control.html">Control</a>
</div>
<div class="summary">Sets the dsiabled state of a control by id.</div>
</td>
<td class="last">ControlManager</td>
</tr>
</tbody>
</table>
</div>
<div class="detailsList">
<div class="details">
<h2>Method details</h2>
<div class="memberDetails" id="ControlManager">
<h3>ControlManager<span class="memberType">constructor</span>
</h3>
<code class="syntax">public 
						function ControlManager(ed:<a href="class_tinymce.Editor.html">Editor</a>, s:Object)</code>
<div class="memberDescription">Constructs a new control manager instance.
Consult the Wiki for more details on this class.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">ed:<a href="class_tinymce.Editor.html">Editor</a>
</td>
<td class="last">TinyMCE editor instance to add the control to.</td>
</tr>
<tr>
<td class="first">s:Object</td>
<td class="last">Optional settings object for the control manager.</td>
</tr>
</table>
</div>
<div class="memberDetails" id="add">
<h3>add<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function add(Control:<a href="class_tinymce.ui.Control.html">Control</a>):<a href="class_tinymce.ui.Control.html">Control</a>
</code>
<div class="memberDescription">Adds a control to the control collection inside the manager.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">Control:<a href="class_tinymce.ui.Control.html">Control</a>
</td>
<td class="last">instance to add to collection.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">
<a href="class_tinymce.ui.Control.html">Control</a> - Control instance that got passed in.</div>
</div>
<div class="memberDetails" id="createButton">
<h3>createButton<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function createButton(id:String, s:Object, cc:Object):<a href="class_tinymce.ui.Control.html">Control</a>
</code>
<div class="memberDescription">Creates a button control instance by id.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">id:String</td>
<td class="last">Unique id for the new button instance. For example "bold".</td>
</tr>
<tr>
<td class="first">s:Object</td>
<td class="last">Optional settings object for the control.</td>
</tr>
<tr>
<td class="first">cc:Object</td>
<td class="last">Optional control class to use instead of the default one.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">
<a href="class_tinymce.ui.Control.html">Control</a> - Control instance that got created and added.</div>
</div>
<div class="memberDetails" id="createColorSplitButton">
<h3>createColorSplitButton<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function createColorSplitButton(id:String, s:Object, cc:Object):<a href="class_tinymce.ui.Control.html">Control</a>
</code>
<div class="memberDescription">Creates a color split button control instance by id.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">id:String</td>
<td class="last">Unique id for the new color split button instance. For example "forecolor".</td>
</tr>
<tr>
<td class="first">s:Object</td>
<td class="last">Optional settings object for the control.</td>
</tr>
<tr>
<td class="first">cc:Object</td>
<td class="last">Optional control class to use instead of the default one.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">
<a href="class_tinymce.ui.Control.html">Control</a> - Control instance that got created and added.</div>
</div>
<div class="memberDetails" id="createControl">
<h3>createControl<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function createControl(n:String):<a href="class_tinymce.ui.Control.html">Control</a>
</code>
<div class="memberDescription">Creates a control by name, when a control is created it will automatically add it to the control collection.
It first ask all plugins for the specified control if the plugins didn't return a control then the default behavior
will be used.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">n:String</td>
<td class="last">Control name to create for example "separator".</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">
<a href="class_tinymce.ui.Control.html">Control</a> - Control instance that got created and added.</div>
</div>
<div class="memberDetails" id="createDropMenu">
<h3>createDropMenu<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function createDropMenu(id:String, s:Object, cc:Object):<a href="class_tinymce.ui.Control.html">Control</a>
</code>
<div class="memberDescription">Creates a drop menu control instance by id.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">id:String</td>
<td class="last">Unique id for the new dropdown instance. For example "some menu".</td>
</tr>
<tr>
<td class="first">s:Object</td>
<td class="last">Optional settings object for the control.</td>
</tr>
<tr>
<td class="first">cc:Object</td>
<td class="last">Optional control class to use instead of the default one.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">
<a href="class_tinymce.ui.Control.html">Control</a> - Control instance that got created and added.</div>
</div>
<div class="memberDetails" id="createListBox">
<h3>createListBox<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function createListBox(id:String, s:Object, cc:Object):<a href="class_tinymce.ui.Control.html">Control</a>
</code>
<div class="memberDescription">Creates a list box control instance by id. A list box is either a native select element or a DOM/JS based list box control. This
depends on the use_native_selects settings state.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">id:String</td>
<td class="last">Unique id for the new listbox instance. For example "styles".</td>
</tr>
<tr>
<td class="first">s:Object</td>
<td class="last">Optional settings object for the control.</td>
</tr>
<tr>
<td class="first">cc:Object</td>
<td class="last">Optional control class to use instead of the default one.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">
<a href="class_tinymce.ui.Control.html">Control</a> - Control instance that got created and added.</div>
</div>
<div class="memberDetails" id="createMenuButton">
<h3>createMenuButton<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function createMenuButton(id:String, s:Object, cc:Object):<a href="class_tinymce.ui.Control.html">Control</a>
</code>
<div class="memberDescription">Creates a menu button control instance by id.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">id:String</td>
<td class="last">Unique id for the new menu button instance. For example "menu1".</td>
</tr>
<tr>
<td class="first">s:Object</td>
<td class="last">Optional settings object for the control.</td>
</tr>
<tr>
<td class="first">cc:Object</td>
<td class="last">Optional control class to use instead of the default one.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">
<a href="class_tinymce.ui.Control.html">Control</a> - Control instance that got created and added.</div>
</div>
<div class="memberDetails" id="createSeparator">
<h3>createSeparator<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function createSeparator(cc:Object):<a href="class_tinymce.ui.Control.html">Control</a>
</code>
<div class="memberDescription">Creates a separator control instance.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">cc:Object</td>
<td class="last">Optional control class to use instead of the default one.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">
<a href="class_tinymce.ui.Control.html">Control</a> - Control instance that got created and added.</div>
</div>
<div class="memberDetails" id="createSplitButton">
<h3>createSplitButton<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function createSplitButton(id:String, s:Object, cc:Object):<a href="class_tinymce.ui.Control.html">Control</a>
</code>
<div class="memberDescription">Creates a split button control instance by id.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">id:String</td>
<td class="last">Unique id for the new split button instance. For example "spellchecker".</td>
</tr>
<tr>
<td class="first">s:Object</td>
<td class="last">Optional settings object for the control.</td>
</tr>
<tr>
<td class="first">cc:Object</td>
<td class="last">Optional control class to use instead of the default one.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">
<a href="class_tinymce.ui.Control.html">Control</a> - Control instance that got created and added.</div>
</div>
<div class="memberDetails" id="createToolbar">
<h3>createToolbar<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function createToolbar(id:String, s:Object, cc:Object):<a href="class_tinymce.ui.Control.html">Control</a>
</code>
<div class="memberDescription">Creates a toolbar container control instance by id.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">id:String</td>
<td class="last">Unique id for the new toolbar container control instance. For example "toolbar1".</td>
</tr>
<tr>
<td class="first">s:Object</td>
<td class="last">Optional settings object for the control.</td>
</tr>
<tr>
<td class="first">cc:Object</td>
<td class="last">Optional control class to use instead of the default one.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">
<a href="class_tinymce.ui.Control.html">Control</a> - Control instance that got created and added.</div>
</div>
<div class="memberDetails" id="destroy">
<h3>destroy<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function destroy():void</code>
<div class="memberDescription">Destroy.
</div>
</div>
<div class="memberDetails" id="get">
<h3>get<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function get(id:String):<a href="class_tinymce.ui.Control.html">Control</a>
</code>
<div class="memberDescription">Returns a control by id or undefined it it wasn't found.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">id:String</td>
<td class="last">Control instance name.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">
<a href="class_tinymce.ui.Control.html">Control</a> - Control instance or undefined.</div>
</div>
<div class="memberDetails" id="setActive">
<h3>setActive<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function setActive(id:String, s:Boolean):<a href="class_tinymce.ui.Control.html">Control</a>
</code>
<div class="memberDescription">Sets the active state of a control by id.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">id:String</td>
<td class="last">Control id to set state on.</td>
</tr>
<tr>
<td class="first">s:Boolean</td>
<td class="last">Active state true/false.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">
<a href="class_tinymce.ui.Control.html">Control</a> - Control instance that got activated or null if it wasn't found.</div>
</div>
<div class="memberDetails" id="setControlType">
<h3>setControlType<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function setControlType(n:string, c:function):function</code>
<div class="memberDescription">Overrides a specific control type with a custom class.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">n:string</td>
<td class="last">Name of the control to override for example button or dropmenu.</td>
</tr>
<tr>
<td class="first">c:function</td>
<td class="last">Class reference to use instead of the default one.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">function - Same as the class reference.</div>
</div>
<div class="memberDetails last" id="setDisabled">
<h3>setDisabled<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function setDisabled(id:String, s:Boolean):<a href="class_tinymce.ui.Control.html">Control</a>
</code>
<div class="memberDescription">Sets the dsiabled state of a control by id.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">id:String</td>
<td class="last">Control id to set state on.</td>
</tr>
<tr>
<td class="first">s:Boolean</td>
<td class="last">Active state true/false.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">
<a href="class_tinymce.ui.Control.html">Control</a> - Control instance that got disabled or null if it wasn't found.</div>
</div>
</div>
</div>
</div>
</body>
</html>
